﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MethodWorx.CMS.Plugins;
using MethodWorx.CMS.UI.Areas.Administration.Models;

namespace MethodWorx.CMS.UI.Areas.Administration.Controllers
{
    public class PluginsController : Controller
    {
        // GET: /Administration/
        private IPluginRepository plugins;

        public PluginsController(IPluginRepository plugins)
        {
            this.plugins = plugins;
        }

        [HttpGet]
        public ActionResult Index()
        {
            return View(new PluginsModel()
            {
                Plugins = this.plugins.All()
            });
        }
    }
}
